<template>
  <div>
    <el-card>
      <el-form :inline="true" class="demo-form-inline" label-position="right">
        <el-row class="button_row">
          <el-col :span="24">
            <el-form-item>
              <el-button type="primary" @click="onHomeHtml">
                生成首页HTML
              </el-button>
              <!-- <el-button type="primary" @click="onDeleteHomeHtml"
                >删除首页HTML</el-button
              > -->
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </el-card>
  </div>
</template>

<script  setup>
import { getHomeStatic } from '@/api/config/staticize.js'
import { ElMessage } from 'element-plus'
// 生成首页html
const onHomeHtml = () => {
  console.log('生成首页html')
  getHomeStatic().then((res) => {
     ElMessage.success(res.message)
  })
}
// 删除首页html
// const onDeleteHomeHtml = () => {
//   console.log('删除首页html')
// }
</script>

<style lang="scss" scoped>
.el-card {
  min-height: 600px;
}
.button_row {
  text-align: center;
  margin-top: 30px;
}
</style>
